package com.netease.ssm.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.netease.ssm.mapper.TrxMapper;
import com.netease.ssm.meta.Trx;

@Service
public class ProductService {
	@Autowired
	private TrxMapper trxMapper;
	public void buyProduct(Trx trx){
		trxMapper.insert(trx);
	}
   public List<Trx> getAllTrx(){
	   
	return trxMapper.selectAllTrx();
	   
   }
   public Trx getTrxByContentId(Integer contentId){
	   
	return trxMapper.selectByContentId(contentId);
	   
   }
}
